<script setup lang="ts">
defineProps<{
    length: number;
    check: boolean;
}>();

const select = ref(false);

defineExpose({
    select
});
</script>

<template>
    <div>
        <div class="text">
            已选{{
                length
            }}个订单，插单排产后，所选订单会和所有已排产订单统一重新排程，并且不可撤销，请确认操作！
        </div>
        <div>
            <div class="select">
                <el-checkbox
                    :value="check"
                    label="所选订单第一顺位排程"
                    @change="val => $emit('check', val)"
                />
            </div>
            <div class="tip">若不勾选则按照正常优先级排产</div>
        </div>
    </div>
</template>

<style scoped lang="scss">
@include b(text) {
    color: var(--q-text-color-secondary);
}

@include b(select) {
    margin-top: 6px;

    :deep(.el-checkbox__label) {
        color: var(--q-color-primary);
    }
}

@include b(tip) {
    height: 54px;
    margin-top: -10px;
    font-size: 12px;
}
</style>
